3.1.6 \(\int \frac {(A+B x) \sqrt {a+b x^2}}{x^2} \, dx\)

Optimal. Leaf size=75 \[ -\frac {\sqrt {a+b x^2} (A-B x)}{x}+A \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )-\sqrt {a} B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {813, 844, 217, 206, 266, 63, 208} \begin {gather*} -\frac {\sqrt {a+b x^2} (A-B x)}{x}+A \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )-\sqrt {a} B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*Sqrt[a + b*x^2])/x^2,x]

[Out]

-(((A - B*x)*Sqrt[a + b*x^2])/x) + A*Sqrt[b]*ArcTanh[(Sqrt[b]*x)/Sqrt[a + b*x^2]] - Sqrt[a]*B*ArcTanh[Sqrt[a +
 b*x^2]/Sqrt[a]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 813

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[((d + e*x)^(
m + 1)*(e*f*(m + 2*p + 2) - d*g*(2*p + 1) + e*g*(m + 1)*x)*(a + c*x^2)^p)/(e^2*(m + 1)*(m + 2*p + 2)), x] + Di
st[p/(e^2*(m + 1)*(m + 2*p + 2)), Int[(d + e*x)^(m + 1)*(a + c*x^2)^(p - 1)*Simp[g*(2*a*e + 2*a*e*m) + (g*(2*c
*d + 4*c*d*p) - 2*c*e*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && NeQ[c*d^2 + a*e^2,
0] && RationalQ[p] && p > 0 && (LtQ[m, -1] || EqQ[p, 1] || (IntegerQ[p] &&  !RationalQ[m])) && NeQ[m, -1] &&
!ILtQ[m + 2*p + 1, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 844

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {(A+B x) \sqrt {a+b x^2}}{x^2} \, dx &=-\frac {(A-B x) \sqrt {a+b x^2}}{x}-\frac {1}{2} \int \frac {-2 a B-2 A b x}{x \sqrt {a+b x^2}} \, dx\\ &=-\frac {(A-B x) \sqrt {a+b x^2}}{x}+(A b) \int \frac {1}{\sqrt {a+b x^2}} \, dx+(a B) \int \frac {1}{x \sqrt {a+b x^2}} \, dx\\ &=-\frac {(A-B x) \sqrt {a+b x^2}}{x}+(A b) \operatorname {Subst}\left (\int \frac {1}{1-b x^2} \, dx,x,\frac {x}{\sqrt {a+b x^2}}\right )+\frac {1}{2} (a B) \operatorname {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,x^2\right )\\ &=-\frac {(A-B x) \sqrt {a+b x^2}}{x}+A \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )+\frac {(a B) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x^2}\right )}{b}\\ &=-\frac {(A-B x) \sqrt {a+b x^2}}{x}+A \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a+b x^2}}\right )-\sqrt {a} B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 99, normalized size = 1.32 \begin {gather*} \frac {\sqrt {a+b x^2} (B x-A)}{x}+\frac {\sqrt {a} A \sqrt {b} \sqrt {\frac {b x^2}{a}+1} \sinh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{\sqrt {a+b x^2}}-\sqrt {a} B \tanh ^{-1}\left (\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*Sqrt[a + b*x^2])/x^2,x]

[Out]

((-A + B*x)*Sqrt[a + b*x^2])/x + (Sqrt[a]*A*Sqrt[b]*Sqrt[1 + (b*x^2)/a]*ArcSinh[(Sqrt[b]*x)/Sqrt[a]])/Sqrt[a +
 b*x^2] - Sqrt[a]*B*ArcTanh[Sqrt[a + b*x^2]/Sqrt[a]]

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.25, size = 92, normalized size = 1.23 \begin {gather*} \frac {\sqrt {a+b x^2} (B x-A)}{x}-A \sqrt {b} \log \left (\sqrt {a+b x^2}-\sqrt {b} x\right )+2 \sqrt {a} B \tanh ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}-\frac {\sqrt {a+b x^2}}{\sqrt {a}}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[((A + B*x)*Sqrt[a + b*x^2])/x^2,x]

[Out]

((-A + B*x)*Sqrt[a + b*x^2])/x + 2*Sqrt[a]*B*ArcTanh[(Sqrt[b]*x)/Sqrt[a] - Sqrt[a + b*x^2]/Sqrt[a]] - A*Sqrt[b
]*Log[-(Sqrt[b]*x) + Sqrt[a + b*x^2]]

________________________________________________________________________________________

fricas [A]  time = 0.93, size = 333, normalized size = 4.44 \begin {gather*} \left [\frac {A \sqrt {b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + B \sqrt {a} x \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) + 2 \, \sqrt {b x^{2} + a} {\left (B x - A\right )}}{2 \, x}, -\frac {2 \, A \sqrt {-b} x \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - B \sqrt {a} x \log \left (-\frac {b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {a} + 2 \, a}{x^{2}}\right ) - 2 \, \sqrt {b x^{2} + a} {\left (B x - A\right )}}{2 \, x}, \frac {2 \, B \sqrt {-a} x \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) + A \sqrt {b} x \log \left (-2 \, b x^{2} - 2 \, \sqrt {b x^{2} + a} \sqrt {b} x - a\right ) + 2 \, \sqrt {b x^{2} + a} {\left (B x - A\right )}}{2 \, x}, -\frac {A \sqrt {-b} x \arctan \left (\frac {\sqrt {-b} x}{\sqrt {b x^{2} + a}}\right ) - B \sqrt {-a} x \arctan \left (\frac {\sqrt {-a}}{\sqrt {b x^{2} + a}}\right ) - \sqrt {b x^{2} + a} {\left (B x - A\right )}}{x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x^2+a)^(1/2)/x^2,x, algorithm="fricas")

[Out]

[1/2*(A*sqrt(b)*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + B*sqrt(a)*x*log(-(b*x^2 - 2*sqrt(b*x^2 + a
)*sqrt(a) + 2*a)/x^2) + 2*sqrt(b*x^2 + a)*(B*x - A))/x, -1/2*(2*A*sqrt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)
) - B*sqrt(a)*x*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - 2*sqrt(b*x^2 + a)*(B*x - A))/x, 1/2*(2*B
*sqrt(-a)*x*arctan(sqrt(-a)/sqrt(b*x^2 + a)) + A*sqrt(b)*x*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + 2
*sqrt(b*x^2 + a)*(B*x - A))/x, -(A*sqrt(-b)*x*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - B*sqrt(-a)*x*arctan(sqrt(-a
)/sqrt(b*x^2 + a)) - sqrt(b*x^2 + a)*(B*x - A))/x]

________________________________________________________________________________________

giac [A]  time = 0.47, size = 102, normalized size = 1.36 \begin {gather*} \frac {2 \, B a \arctan \left (-\frac {\sqrt {b} x - \sqrt {b x^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} - A \sqrt {b} \log \left ({\left | -\sqrt {b} x + \sqrt {b x^{2} + a} \right |}\right ) + \sqrt {b x^{2} + a} B + \frac {2 \, A a \sqrt {b}}{{\left (\sqrt {b} x - \sqrt {b x^{2} + a}\right )}^{2} - a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x^2+a)^(1/2)/x^2,x, algorithm="giac")

[Out]

2*B*a*arctan(-(sqrt(b)*x - sqrt(b*x^2 + a))/sqrt(-a))/sqrt(-a) - A*sqrt(b)*log(abs(-sqrt(b)*x + sqrt(b*x^2 + a
))) + sqrt(b*x^2 + a)*B + 2*A*a*sqrt(b)/((sqrt(b)*x - sqrt(b*x^2 + a))^2 - a)

________________________________________________________________________________________

maple [A]  time = 0.01, size = 97, normalized size = 1.29 \begin {gather*} A \sqrt {b}\, \ln \left (\sqrt {b}\, x +\sqrt {b \,x^{2}+a}\right )-B \sqrt {a}\, \ln \left (\frac {2 a +2 \sqrt {b \,x^{2}+a}\, \sqrt {a}}{x}\right )+\frac {\sqrt {b \,x^{2}+a}\, A b x}{a}+\sqrt {b \,x^{2}+a}\, B -\frac {\left (b \,x^{2}+a \right )^{\frac {3}{2}} A}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(b*x^2+a)^(1/2)/x^2,x)

[Out]

-A/a/x*(b*x^2+a)^(3/2)+A/a*b*x*(b*x^2+a)^(1/2)+A*b^(1/2)*ln(b^(1/2)*x+(b*x^2+a)^(1/2))-B*a^(1/2)*ln((2*a+2*(b*
x^2+a)^(1/2)*a^(1/2))/x)+B*(b*x^2+a)^(1/2)

________________________________________________________________________________________

maxima [A]  time = 1.39, size = 59, normalized size = 0.79 \begin {gather*} A \sqrt {b} \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right ) - B \sqrt {a} \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right ) + \sqrt {b x^{2} + a} B - \frac {\sqrt {b x^{2} + a} A}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x^2+a)^(1/2)/x^2,x, algorithm="maxima")

[Out]

A*sqrt(b)*arcsinh(b*x/sqrt(a*b)) - B*sqrt(a)*arcsinh(a/(sqrt(a*b)*abs(x))) + sqrt(b*x^2 + a)*B - sqrt(b*x^2 +
a)*A/x

________________________________________________________________________________________

mupad [B]  time = 1.69, size = 89, normalized size = 1.19 \begin {gather*} B\,\sqrt {b\,x^2+a}-\frac {A\,\sqrt {b\,x^2+a}}{x}-B\,\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {b\,x^2+a}}{\sqrt {a}}\right )-\frac {A\,\sqrt {b}\,\mathrm {asin}\left (\frac {\sqrt {b}\,x\,1{}\mathrm {i}}{\sqrt {a}}\right )\,\sqrt {b\,x^2+a}\,1{}\mathrm {i}}{\sqrt {a}\,\sqrt {\frac {b\,x^2}{a}+1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((a + b*x^2)^(1/2)*(A + B*x))/x^2,x)

[Out]

B*(a + b*x^2)^(1/2) - (A*(a + b*x^2)^(1/2))/x - B*a^(1/2)*atanh((a + b*x^2)^(1/2)/a^(1/2)) - (A*b^(1/2)*asin((
b^(1/2)*x*1i)/a^(1/2))*(a + b*x^2)^(1/2)*1i)/(a^(1/2)*((b*x^2)/a + 1)^(1/2))

________________________________________________________________________________________

sympy [A]  time = 11.97, size = 124, normalized size = 1.65 \begin {gather*} - \frac {A \sqrt {a}}{x \sqrt {1 + \frac {b x^{2}}{a}}} + A \sqrt {b} \operatorname {asinh}{\left (\frac {\sqrt {b} x}{\sqrt {a}} \right )} - \frac {A b x}{\sqrt {a} \sqrt {1 + \frac {b x^{2}}{a}}} - B \sqrt {a} \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} x} \right )} + \frac {B a}{\sqrt {b} x \sqrt {\frac {a}{b x^{2}} + 1}} + \frac {B \sqrt {b} x}{\sqrt {\frac {a}{b x^{2}} + 1}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b*x**2+a)**(1/2)/x**2,x)

[Out]

-A*sqrt(a)/(x*sqrt(1 + b*x**2/a)) + A*sqrt(b)*asinh(sqrt(b)*x/sqrt(a)) - A*b*x/(sqrt(a)*sqrt(1 + b*x**2/a)) -
B*sqrt(a)*asinh(sqrt(a)/(sqrt(b)*x)) + B*a/(sqrt(b)*x*sqrt(a/(b*x**2) + 1)) + B*sqrt(b)*x/sqrt(a/(b*x**2) + 1)

________________________________________________________________________________________